/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.delogic.simuladorbancario.main.model;

/**
 *
 * @author Rodrigo
 */
public enum ValidadorDocumentos {
    
    CPF(){
        @Override
        public boolean valido(String document){
            return document != null && document.length() == 11;
        }
    }
    , CNPJ(){
        @Override
        public boolean valido(String document){
            if(document.length() == 14)
                return true;
            return false;
        }        
    };
    
    public abstract boolean valido(String documento);
}
